#ifndef WXSITEMEDITORDRAGASSIST_H
#define WXSITEMEDITORDRAGASSIST_H

#include "wxsitemeditorcontent.h"
#include "wxsitem.h"
#include <wx/dc.h>
#include <wx/bitmap.h>


class wxsItemEditorDragAssist {
  public:

    enum DragAssistType {
      dtNone,
      dtOutline,
      dtColourMix
    };


    wxsItemEditorDragAssist( wxsItemEditorContent* Content );


    ~wxsItemEditorDragAssist();


    void NewDragging();


    void DrawExtra( wxsItem* Target, wxsItem* Parent, bool AddAfter, wxDC* DC );

  private:

    wxsItem* m_PreviousTarget;
    wxsItem* m_PreviousParent;
    bool m_PreviousAddAfter;

    wxBitmap* m_TargetBitmap;
    wxRect    m_TargetRect;
    bool      m_IsTarget;

    wxBitmap* m_ParentBitmap;
    wxRect    m_ParentRect;
    bool      m_IsParent;

    wxsItemEditorContent* m_Content;

    void UpdateAssist( wxsItem* NewTarget, wxsItem* NewParent, bool NewAddAfter );
    void RebuildParentAssist();
    void RebuildTargetAssist();
    inline DragAssistType AssistType();
    inline wxColour TargetColour();
    inline wxColour ParentColour();
    void ColourMix( wxImage& Image, const wxColour& Colour );
    void UpdateRect( wxRect& Rect, const wxBitmap& bmp );
};

#endif
